#ifndef FREEHAND_H
#define FREEHAND_H

#include <QVector>
#include <QPoint>
#include <QPainter>
#include "shape.h"

class FreeHand:public Shape{
public:
    QVector<QPoint> free_point_array;
    FreeHand(){}
    FreeHand(const QVector<QPoint> &point_array){
        for(int i=0; i<point_array.size();i++){
            free_point_array.push_back(point_array[i]);
        }
    }
    ~FreeHand(){
    }
    void paint(QPainter &painter){
        int i;
        for(i=0;i<free_point_array.size()-1;i++)
            painter.drawLine(free_point_array[i],free_point_array[i+1]);
        //painter.drawLine(free_point_array[i],free_point_array[0]);
    }
};


#endif // FREEHAND_H
